package models.mapper;

import java.util.List;

import models.DrVKeywords;
import models.DrVKeywordsExample;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface DrVKeywordsMapper {
    int countByExample(DrVKeywordsExample example);

    int deleteByExample(DrVKeywordsExample example);

    int insert(DrVKeywords record);

    int insertSelective(DrVKeywords record);

    List<DrVKeywords> selectByExample(DrVKeywordsExample example);

    int updateByExampleSelective(@Param("record") DrVKeywords record, @Param("example") DrVKeywordsExample example);

    int updateByExample(@Param("record") DrVKeywords record, @Param("example") DrVKeywordsExample example);
    /**
     * 查询优化记录
     * @param example
     * @return
     */
    @Select("select COURTNAME,ISUSE,WORDID,to_char(MODIFYTIME,'MM/dd HH24:mi') as modifyString "
    		+ "from ( select * from DR_V_KEYWORDS order by MODIFYTIME desc) where rownum<11 order by modifytime desc")
	List<DrVKeywords> listWord(DrVKeywordsExample example);
}